<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta content="telephone=no" name="format-detection" />
  <meta itemprop="name" content="" />
  <meta itemprop="image" content="/img/share-icon.jpg" />
  <meta name="description" itemprop="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <link rel="stylesheet" href="/css/reset.css">
  <link rel="stylesheet" href="/css/normalize.css">
  <link rel="stylesheet" href="/css/yyzbk/yy_success.css">
  <title>高考英语阅读提分冲刺</title>
  <% include ../component/_common_tongji.html %>
    <style>
      [v-cloak] {
        display: none;
      }

      .bg {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
      }

      .bg .modal {
        background: #FFF;
        width: 6rem;
        height: 2rem;
        line-height: 0.6rem;
        padding: 0.4rem 0;
        font-size: 0.46rem;
        text-align: center;
        margin: 0 auto;
        margin-top: 2rem;
        box-sizing: border-box;
      }
    </style>
    <script>
      var scale = 1 / devicePixelRatio;
      document.querySelector('meta[name="viewport"]').setAttribute('content', 'width=device-width, initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=no');
      document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
      var token = window.localStorage.getItem('token');
      if (!token) {
        if (location.search != "") {
          location.replace('/yyzbk' + location.search + "&o=share");
        } else {
          location.replace('/yyzbk?o=share');
        }
      }
      function browserRedirect() {
        var sUserAgent = navigator.userAgent.toLowerCase();
        var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
        var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
        if ((bIsIpad || bIsIphoneOs)) {
          document.getElementsByTagName('html')[0].style.fontFamily = 'PingFangSC-Regular';
        }
      }
      browserRedirect();
    </script>
</head>

<body>
  <div id="app">
    <div class="bg" v-cloak v-if='!shareImgSrc'>
      <div class="content">
        <button :class="{ enterInfo : enterInfos,surface: !surface}" id="enterInfo" @click='handleEnterInfo'>报名信息</button>
        <button :class="{ enterInfo : !enterInfos,surface: surface}" id="surface" @click='handleSurface'>课程表</button>
        <div class="enterInfomation" v-show='enterInfos'>
          <img src="/img/04-01.png" alt="图片加载失败" class="zbk">
          <div class="person">
            <img src="/img/04-02.png" alt="图片加载失败">
            <p class="perMoney">已获助学金
              <span class="money"> {{money}} </span>元</p>
            <p class="perEnter">成功邀请
              <span class="count">{{invitation_count}}</span>位好友</p>
            <p class="name">{{realname}}</p>
          </div>
          <img src="/img/04-enter.png" alt="图片加载失败" class="imgEnter">
          <a :href="qqVip" style="text-decoration: none;" class="aqq">
            <span class="qq">加入听课VIP群</span>
          </a>
          <a href="javascript:;" class="share" @click='handleShareImg'>
            <img src="/img/1_02.png" alt="分享"> 分享我的专属链接
          </a>
          <a href="javascript:;" class="toggle" @click='handleToggle'>切换账号</a>
        </div>
        <div class="classSurface" v-show='!enterInfos'>
          <div>
            <span>01. </span>
            <p>2018年高考英语冲刺及阅读理解部分综述</p>
            <p class="time">直播时间：3月17日 周六 20:00-21:00</p>
          </div>
          <div>
            <span>02.</span>
            <p> 英语阅读的基本方法和方法论&主旨大意类</p>
            <p class="time">直播时间：3月23日 周五 20:00-21:00</p>
          </div>
          <div>
            <span>03. </span>
            <p>理解力提升、主旨大意类题目作业讲评</p>
            <p class="time">直播时间：3月27日 周二 20:00-21:00</p>
          </div>
          <div>
            <span>04. </span>
            <p>细节理解类题目、10种阅读段落的展开方法（上）</p>
            <p class="time">直播时间：4月3日 周二 20:00-21:00</p>
          </div>
          <div>
            <span>05. </span>
            <p>细节理解类题目真题讲评、阅读中的词汇理解和推理过程、10种阅读段落的展开方法（下）</p>
            <p class="time">直播时间：4月6日 周五 20:00-21:00</p>
          </div>
          <div>
            <span>06. </span>
            <p>推理判断类、词汇类题目真题讲评</p>
            <p class="time">直播时间：4月10日 周二 20:00-21:00</p>
          </div>
          <div>
            <span>07. </span>
            <p>任务型阅读七选五</p>
            <p class="time">直播时间：4月13日 周五 20:00-21:00</p>
          </div>
          <div>
            <span>08. </span>
            <p>阅读部分模拟练习、真题和模考讲评</p>
            <p class="time">直播时间：4月17日 周二 20:00-21:00</p>
          </div>
        </div>
      </div>
    </div>
    <% include ../userInfo/shareImg.html %>
  </div>

  <script src="https://sfile.tl100.com/js/libs/vue.min.js"></script>
  <script src="https://sfile.tl100.com/js/libs/axios.min.js"></script>
  <script src="/js/api.js"></script>
  <script src="/js/wx.js"></script>
  <script src="/js/getuserinfo.js"></script>
  <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  <script>
    new Vue({
      el: '#app',
      data: {
        realname: '小花',
        invitation_count: '',
        money: '',
        imgSrc: '',
        img:'/img/04-02.png',
        qqVip: '',
        img: '',
        enterInfos: true,
        surface: true,
        shareImg: false,
        shareImgSrc: false
      },
      mounted() {
        this.handleLuoBoAddress();
        this.getUserInfo();
        var shareUrl = "https://m.tl100.com/yyzbk?o=share";
        <% if (invitation_code != "") { %>
          shareUrl += "&invitation_code=<%= invitation_code %>";
        <%}%>
          wxObj({
            shareUrl: shareUrl,
            title: '小伙伴快来帮我领取高考英语提升20分+的机会！就差3个名额了！',
            desc: '高考英语阅读理解单科特训直播课，开课啦！',
            link: '&',
            imgUrl: 'img/ygshare.jpg'
          });
      },
      methods: {
        handleEnterInfo: function () {
          this.enterInfos = true;
          this.surface = true;
        },
        handleSurface: function () {
          this.enterInfos = false;
          this.surface = false;
        },
        getUserInfo: function () {
          var vm = this;
          var token = localStorage.getItem('token');
          getUserInfo(this, token, '/api/sign_up_xiaofeng/getUserSignUp', function (res_data) {
            var res = res_data;
            vm.invitation_count = res.data.msg.invitation_count;
            vm.realname = res.data.msg.realname;
            vm.money = res.data.msg.account_xiaofeng;
          })
        },
        handleToggle: function () {
          localStorage.removeItem('token');
          location.replace('/yyzbk/signup');
        },
        handleLuoBoAddress: function () {
          var vm = this;
          api.post('/api/data_lobo/getLuoBoAddress')
            .then(function (res) {
              if (res.data.res_code == 1) {
                vm.qqVip = res.data.msg;
              }
              if (res.data.res_code < 0) {
                setLog('/api/data_lobo/getLuoBoAddress:fail', JSON.stringify(res.data));
              }
            }).catch(function (error) {
              setLog('/api/data_lobo/getLuoBoAddress:catch', JSON.stringify(error));
            });
        },
        handleShareImg: function () {
          // 获取图片
          if (this.shareImg) {
            return;
          }
          var token = localStorage.getItem('token');
          var vm = this;
          this.shareImg = true;
          if (token && token != '') {
            api.post('/api/user/getXiaoFengShareImage', {
              token: token
            }).then(function (res) {
              console.log(res);
              var date = new Date();
              var time = date.getTime();
              vm.shareImgSrc = true;
              vm.imgSrc = res.data.msg + '?' + time;
              vm.shareImg = false;
            }).catch(function (error) {
              setLog('/api/user/getXiaoFengShareImage:catch', JSON.stringify(error));
              vm.shareImg = false;
            });
          } else {
            location.replace('/yyzbk/signup');
          }

          clearTimeout(timer);
          var timer = setTimeout(function () {
            document.getElementsByClassName('bg')[0].style.display = 'none';
          }, 3500);
        }
      }
    })


  </script>
</body>

</html>